import java.util.Scanner;

public class Test14 {
    public int x(int x){
        if (x == 1){
            return x;
        }
        return x*x(x-1);
    }
    public static void main(String[] args) {
        int t;
        int result;
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()){
            t = sc.nextInt();
            Test14 test14 = new Test14();
            result = test14.x(t);
            System.out.println(result);
        }
    }
}
